<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/include/TLDInclude.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<title>活动录入</title>
<link href="${ctx}/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/js/select-ui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>


<script type="text/javascript">
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 100
	});
	
});


function checkdata(){
	  if ($("#inputid1").val() == '' || $("#inputid2").val() == '' || $("#inputid3").val() == '' ) {
		  alert("带*的值必须录入");
		  return false;
	  }
	return true;
}
</script>

</head>

<body>
<c:if test="${not empty msg}">
			<div id="message" style="color: red;" align="center">
				${msg}
			</div>
</c:if>

	<c:if test="${empty msg}">
			


    
    <div class="formbody">
    
    <div class="formtitle"><span>奖品录入</span></div>
    <form:form action="${ctx}/prize/update" method="post" modelAttribute="entity" >
    <input type=hidden name="id"  value="${entity.id}"/>
    <ul class="forminfo">
    
    	<c:if test="${empty entity.id}">
    <li><label>奖品名称<b>*</b></label><input id="inputid1" name="prizeName" type="text" value="${entity.prizeName}" class="dfinput" /></li>
   
   </c:if>
   
   
    <li><label>奖品位置<b>*</b></label><input id="inputid2" name="prizeIndex" type="text" value="${entity.prizeIndex}" class="dfinput" /><i>根据前台约定(1为不中奖)</i></li>
    
      <li><label>是否消耗奖卷</label>
    <div class="vocation">
     <select id="inputid8" name="consumeNum" class="select1">
    <option value="1"  <c:if test= "${entity.consumeNum eq 1}">
                                                         selected="selected "
                                                 </c:if>>消耗</option>
     <option value="0"  <c:if test= "${entity.consumeNum eq 0}">
                                                         selected="selected "
                                                 </c:if>>不消耗</option>
    </select>
    </div>
    </li>
    
    
    <li><label>允许奖品展示</label>
    <div class="vocation">
     <select id="my_select_select" name="showPrize" class="select1">
    <option value="1"  <c:if test= "${entity.showPrize eq 1}">
                                                         selected="selected "
                                                 </c:if>>允许</option>
     <option value="0" <c:if test= "${entity.showPrize eq 0}">
                                                         selected="selected "
                                                 </c:if>>不允许</option>
    </select>
    </div>
    </li>
     <li><label>所属活动<b>*</b></label>  
    <div class="vocation">
    <select id="inputid3" name="activityId" class="select1">
    <c:forEach items= "${activitys}" var="maste">
    <option value="${maste.id}"
     <c:if test= "${entity.activityId eq maste.id}">
                                                         selected="selected "
                                                 </c:if>
    >${maste.name}</option>
    </c:forEach>
    </select>
    </div>
   	   <li><label>&nbsp;</label><input name="" type="submit" onclick="javascript:return checkdata()" class="btn" value="确认保存"/></li>
    </ul>
    
    </form:form>
    </div>

</c:if>
</body>

</html>
